import bb.cascades 1.3

Container {
    property alias text: btn.text
    property alias loading: loader.visible
    signal click()
    
    layout: DockLayout {
    }
    
    Container {
        horizontalAlignment: HorizontalAlignment.Center
        verticalAlignment: VerticalAlignment.Center
        
        Button {
            id: btn
            enabled: ! loader.visible
            
            onClicked: {
                click();
            }
        }
    }
    
    Container {
        horizontalAlignment: HorizontalAlignment.Left
        verticalAlignment: VerticalAlignment.Center
        
        leftPadding: 10
        
        ActivityIndicator {
            id: loader
            running: true
        }
    }
}
